package GUILayer;

import java.awt.BorderLayout;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;

public class PersonGUI extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int authLevel;

	public PersonGUI() {
		authLevel = LoginUI.getLoggedInPosition();
		initialize();
	}

	public void initialize() {
		this.setLayout(new BorderLayout());

		JTabbedPane subMenu = new JTabbedPane();
		subMenu.setTabLayoutPolicy(JTabbedPane.WRAP_TAB_LAYOUT);
		this.add(subMenu, BorderLayout.CENTER);

		JPanel GuestGUI = new GuestGUI();
		subMenu.add("Guest", GuestGUI);

		if (authLevel == 1 || authLevel == 2) {
			JPanel EmployeeGUI = new EmployeeGUI();
			subMenu.add("Employee", EmployeeGUI);
		}
	}
}
